package org.edu.modules.enroll.tools;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OSSConfig {

    @Bean
    public OSS ossClient(){
        // Endpoint以杭州为例。
        String endpoint = "oss-cn-hangzhou.aliyuncs.com";
        // 阿里云主账号AccessKey
        String accessKeyId = "LTAI4GKzxLfWZhdneCAToQrW";
        String accessKeySecret = "Jrz7mn1pjdlR5bHx3JlNX1Oh1EmSAK";
        // 创建OSSClient实例。
        OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
        return ossClient;
    }

}
